{% extends 'base.html' %}

{% block title %}注册{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6 col-lg-4">
        <div class="card shadow">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">用户注册</h4>
            </div>
            <div class="card-body">
                <form method="post">
                    <div class="mb-3">
                        <label for="username" class="form-label">用户名</label>
                        <input type="text" class="form-control" id="username" name="username" required>
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">密码</label>
                        <input type="password" class="form-control" id="password" name="password" required>
                    </div>
                    <div class="mb-3">
                        <label for="password2" class="form-label">确认密码</label>
                        <input type="password" class="form-control" id="password2" name="password2" required>
                    </div>
                    <div class="mb-3">
                        <label for="user_type" class="form-label">用户类型</label>
                        <select class="form-select" id="user_type" name="user_type" required>
                            <option value="farmer">农户</option>
                            <option value="researcher">农业科研人员</option>
                            <option value="government">农业部门工作人员</option>
                            <option value="enterprise">农业企业管理人员</option>
                        </select>
                    </div>
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary">注册</button>
                    </div>
                </form>
            </div>
            <div class="card-footer text-center">
                <a href="{{ url_for('auth.login') }}" class="text-decoration-none">已有账号？立即登录</a>
            </div>
        </div>
    </div>
</div>
{% endblock %} 